home *** CD-ROM | disk | FTP | other *** search
/ Revista do CD-ROM 101 / CD-ROM 101.iso / compl / maya5ple / Install_MayaPLE5_English.exe / Maya / Data1.cab / AEsubdivToPolyTemplate.mel < prev    next >
Encoding:
Text File  |  2003-07-17  |  4.5 KB  |  132 lines

  1. // Copyright (C) 1997-2002 Alias|Wavefront,
  2. // a division of Silicon Graphics Limited.
  3. //
  4. // The information in this file is provided for the exclusive use of the
  5. // licensees of Alias|Wavefront.  Such users have the right to use, modify,
  6. // and incorporate this code into other products for purposes authorized
  7. // by the Alias|Wavefront license agreement, without fee.
  8. //
  9. // ALIAS|WAVEFRONT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
  10. // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
  11. // EVENT SHALL ALIAS|WAVEFRONT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  12. // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
  13. // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  14. // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  15. // PERFORMANCE OF THIS SOFTWARE.
  16. //
  17. // Copyright (C) 1997-2000 Alias|Wavefront,
  18. // a division of Silicon Graphics Limited.
  19. //
  20. // The information in this file is provided for the exclusive use of the
  21. // licensees of Alias|Wavefront.  Such users have the right to use, modify,
  22. // and incorporate this code into other products for purposes authorized
  23. // by the Alias|Wavefront license agreement, without fee.
  24. //
  25. // ALIAS|WAVEFRONT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
  26. // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
  27. // EVENT SHALL ALIAS|WAVEFRONT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  28. // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
  29. // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  30. // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  31. // PERFORMANCE OF THIS SOFTWARE.
  32. //
  33. //
  34. //    Alias|Wavefront Script File
  35. //
  36. //    Creation Date:    March 24, 1999
  37. //
  38. //
  39. //    Procedure Name:
  40. //    AErevolveTemplate
  41. //
  42. //    Description Name;
  43. //    Creates the attribute editor controls for the subdivToPoly node
  44. //
  45. //    Input Value:
  46. //    nodeName
  47. //
  48. //    Output Value:
  49. //    None
  50. //
  51.  
  52. global proc subdivFormatControls( string $nodeName )
  53. {
  54.     string $formatAttrName = $nodeName + ".format";
  55.     int $value = `getAttr $formatAttrName`;
  56.  
  57.     switch ($value) {
  58.  
  59.     case 0:
  60.       // Uniform or constant depth
  61.       editorTemplate -dimControl $nodeName "depth" false;
  62.       editorTemplate -dimControl $nodeName "sampleCount" false;
  63.       editorTemplate -dimControl $nodeName "maxPolys" true;
  64.       editorTemplate -dimControl $nodeName "extractPointPosition" false;
  65.       break;
  66.  
  67.     case 1:
  68.       // Adaptive or leaf
  69.       editorTemplate -dimControl $nodeName "depth" true;
  70.       editorTemplate -dimControl $nodeName "sampleCount" false;
  71.       editorTemplate -dimControl $nodeName "maxPolys" true;
  72.       editorTemplate -dimControl $nodeName "extractPointPosition" true;
  73.       break;
  74.  
  75.     case 2:
  76.       // Max Number of Polygons
  77.       editorTemplate -dimControl $nodeName "depth" true;
  78.       editorTemplate -dimControl $nodeName "sampleCount" true;
  79.       editorTemplate -dimControl $nodeName "maxPolys" false;
  80.       editorTemplate -dimControl $nodeName "extractPointPosition" true;
  81.       break;
  82.  
  83.     case 3:
  84.       // Vertices
  85.       editorTemplate -dimControl $nodeName "depth" false;
  86.       editorTemplate -dimControl $nodeName "sampleCount" true;
  87.       editorTemplate -dimControl $nodeName "maxPolys" true;
  88.       editorTemplate -dimControl $nodeName "extractPointPosition" true;
  89.       break;
  90.  
  91.     }
  92. }
  93.  
  94. global proc AEsubdivToPolyTemplate( string $nodeName )
  95. {
  96.     
  97.     editorTemplate -beginScrollLayout;
  98.  
  99.     editorTemplate -beginLayout "Subdiv Tessellate History" -collapse false;
  100.  
  101.         editorTemplate -callCustom "AEinputNew \"Input Subdiv Surface\""
  102.                     "AEinputReplace \"Input Subdiv Surface\""
  103.                     "inSubdiv";
  104.  
  105.     editorTemplate -beginLayout "Options";
  106.           editorTemplate -addControl "format" "subdivFormatControls";
  107.         editorTemplate -addControl "depth";
  108.         editorTemplate -addControl "sampleCount";
  109.         editorTemplate -addControl "maxPolys";
  110.         editorTemplate -addControl "extractPointPosition";
  111.         editorTemplate -addControl "shareUVs";
  112.     editorTemplate -endLayout;
  113.  
  114.     editorTemplate -endLayout;
  115.  
  116.     // include/call base class/node attributes
  117.     AEabstractBaseCreateTemplate $nodeName;
  118.  
  119.     //suppressed attributes
  120.     editorTemplate -suppress "inSubdiv";
  121.     editorTemplate -suppress "outMesh";
  122.     editorTemplate -suppress "inSubdCVId";
  123.     editorTemplate -suppress "outv";
  124.     editorTemplate -suppress "outSubdCVId";
  125.     editorTemplate -suppress "applyMatrixToResult";
  126.     editorTemplate -suppress "subdNormals";
  127.  
  128.     editorTemplate -addExtraControls;
  129.     editorTemplate -endScrollLayout;
  130. }
  131.  
  132.